The present invention relates generally to the field of software visualization and, more specifically, to a method and system for visualizing the run-time functioning and operations of a computer program via a visual display presented by a user interface.
While a number of software visualization tools exist, some programming environments (e.g., the Java programming environment) impose restrictions on access to data structures maintained by program (e.g., variables). Within the Java programming environment, for example, local variables (i.e., variables contained in a method invocation frame) can only be accessed by code in that method and by an extant thread, when the relevant method currently being executed at the top of the extant thread""s stack. Further, class and object variables may be declared in such a way so as to prevent access by code to such class and object variables outside the relevant class. It will be appreciated that the access restrictions to the structure of the computer program are problematic for a third party visualization tool, which seeks to provide a visual view of such data structures.
By way of background to the Java program environment, Java is an object-oriented language. Java source code files (files with a java extension) are compiled into a format called xe2x80x9cbytecodexe2x80x9d (files with a .class extension), which can be executed by a Java interpreter. Compiled Java code can be run across multiple platforms by Java interpreters and run-time environments, known as Java Virtual Machines JVMs), that have been developed for a variety of platforms (e.g., Unix, the Macintosh Operating System, and the Windows family of operating systems). Bytecode may be converted directly into machine language instructions by a Just-in-Time compiler (JIT).
FIG. 1 is a diagrammatic representation of the execution of a Java program. Java class files (i.e., bytecode), which comprises the compiled Java code, are converted to machine-language program code 14 by the JIT of the Java Virtual Machine. The program code 14 in turn dynamically creates and maintains a program data structure, and also populates the data structure 16 with a value set 18 (e.g., numeric, text or alphanumeric values).
According to a first aspect of the present invention, there is provided a method of visualizing functioning of a computer program. A duplicate copy of a data structure of the computer program is maintained during an execution (or run-time) of the computer program. A visual representation of the duplicate copy of the data structure is displayed on a display device so as to visualize the execution of the computer program.
Other features of the present invention will be apparent from the accompanying drawings and from the detailed description which follows.